package com.lanou.service.Impl;

import com.lanou.entity.ExchangeRecord;
import com.lanou.mapper.ExchangeRecordMapper;
import com.lanou.service.ExchangeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ExchangeRecordServiceImpl
 * @Description TODO
 * @Author cuipengwei
 * @Date 2025年08月22日 19:51
 * @Version 1.0
 */
@Service
public class ExchangeRecordServiceImpl implements ExchangeRecordService {
    @Autowired
    private ExchangeRecordMapper exchangeRecordMapper;
    @Override
    public int addRecord(ExchangeRecord record) {
        int i = exchangeRecordMapper.addRecord(record);
        return i;
    }

    @Override
    public List<Map<String, Object>> getRecordsByUserId(Integer userId) {
        List<Map<String, Object>> recordsByUserId = exchangeRecordMapper.getRecordsByUserId(userId);
        return recordsByUserId;
    }
}
